// The various set/read commands below have hard coded the relevant data.
// The data being set is in the final byte of the command. When reading,
// the last byte we send is irrelevant.

// Set PHY to 100 megabits / second, full duplex
parameter SET_PHY_MODE = 32'b00000000_00101110_00000100_11011000;


// Set/read our MAC address.
parameter SET_MAC_ADDRESS_BYTE_0  =  32'b00000000_00001001_00000100_10101010;
parameter READ_MAC_ADDRESS_BYTE_0 =  32'b00000000_00001001_00000000_00000000;
parameter SET_MAC_ADDRESS_BYTE_1  =  32'b00000000_00001010_00000100_10101111;
parameter READ_MAC_ADDRESS_BYTE_1 =  32'b00000000_00001010_00000000_00000000;
parameter SET_MAC_ADDRESS_BYTE_2  =  32'b00000000_00001011_00000100_11111010;
parameter READ_MAC_ADDRESS_BYTE_2 =  32'b00000000_00001011_00000000_00000000;
parameter SET_MAC_ADDRESS_BYTE_3  =  32'b00000000_00001100_00000100_11001100;
parameter READ_MAC_ADDRESS_BYTE_3 =  32'b00000000_00001100_00000000_11001100;
parameter SET_MAC_ADDRESS_BYTE_4  =  32'b00000000_00001101_00000100_11100011;
parameter READ_MAC_ADDRESS_BYTE_4 =  32'b00000000_00001101_00000000_11100011;
parameter SET_MAC_ADDRESS_BYTE_5  =  32'b00000000_00001110_00000100_00011100;
parameter READ_MAC_ADDRESS_BYTE_5 =  32'b00000000_00001110_00000000_00011100;

// Set/read our IP address. (169.254.0.1)
parameter SET_SOURCE_IP_ADDRESS_0  =  32'b00000000_00001111_00000100_10101001;
parameter READ_SOURCE_IP_ADDRESS_0 =  32'b00000000_00001111_00000000_00000000;
parameter SET_SOURCE_IP_ADDRESS_1  =  32'b00000000_00010000_00000100_11111110;
parameter READ_SOURCE_IP_ADDRESS_1 =  32'b00000000_00010000_00000000_00000000;
parameter SET_SOURCE_IP_ADDRESS_2  =  32'b00000000_00010001_00000100_00000000;
parameter READ_SOURCE_IP_ADDRESS_2 =  32'b00000000_00010001_00000000_00000000;
parameter SET_SOURCE_IP_ADDRESS_3  =  32'b00000000_00010010_00000100_00000001;
parameter READ_SOURCE_IP_ADDRESS_3 =  32'b00000000_00010010_00000000_00000000;

// Set/read out gateway address. (169.254.0.0)
parameter SET_GATEWAY_ADDRESS_0    = 32'b00000000_00000001_00000100_10101001;
parameter READ_GATEWAY_ADDRESS_0   = 32'b00000000_00000001_00000000_00000000;
parameter SET_GATEWAY_ADDRESS_1    = 32'b00000000_00000010_00000100_11111110;
parameter READ_GATEWAY_ADDRESS_1   = 32'b00000000_00000010_00000000_00000000;
parameter SET_GATEWAY_ADDRESS_2    = 32'b00000000_00000011_00000100_00000000;
parameter READ_GATEWAY_ADDRESS_2   = 32'b00000000_00000011_00000000_00000000;
parameter SET_GATEWAY_ADDRESS_3    = 32'b00000000_00000100_00000100_00000000;
parameter READ_GATEWAY_ADDRESS_3   = 32'b00000000_00000100_00000000_00000000;

// Set/read out subnet mask. (255.255.255.0)
parameter SET_SUBNET_MASK_0  = 32'b00000000_00000101_00000100_11111111;
parameter READ_SUBNET_MASK_0 = 32'b00000000_00000101_00000000_00000000;
parameter SET_SUBNET_MASK_1  = 32'b00000000_00000110_00000100_11111111;
parameter READ_SUBNET_MASK_1 = 32'b00000000_00000110_00000000_00000000;
parameter SET_SUBNET_MASK_2  = 32'b00000000_00000111_00000100_11111111;
parameter READ_SUBNET_MASK_2 = 32'b00000000_00000111_00000000_00000000;
parameter SET_SUBNET_MASK_3  = 32'b00000000_00001000_00000100_00000000;
parameter READ_SUBNET_MASK_3 = 32'b00000000_00001000_00000000_00000000;

// Set the socket mode to UDP with no blocking
parameter SET_SOCKET_0_MODE  = 32'b00000000_00000000_00001100_00000010;
parameter READ_SOCKET_0_MODE = 32'b00000000_00000000_00001000_00000010;

// Set the socket source port number to 5000. Requires two commands.
parameter SET_SOCKET_0_SRC_PORT_0 = 32'b00000000_00000100_00001100_00010011;
parameter SET_SOCKET_0_SRC_PORT_1 = 32'b00000000_00000101_00001100_10001000;

// Set socket 0's destination IP address (169.254.0.123)
parameter SET_SOCKET_0_DST_IP_0 = 32'b00000000_00001100_00001100_10101001;
parameter SET_SOCKET_0_DST_IP_1 = 32'b00000000_00001101_00001100_11111110;
parameter SET_SOCKET_0_DST_IP_2 = 32'b00000000_00001110_00001100_00000000;
parameter SET_SOCKET_0_DST_IP_3 = 32'b00000000_00001111_00001100_01111011;

// Set socket 0's destination port to 5000. Requires two commands.
parameter SET_SOCKET_0_DST_PRT_0 = 32'b00000000_00010000_00001100_00010011;
parameter SET_SOCKET_0_DST_PRT_1 = 32'b00000000_00010001_00001100_10001000;

// Set socket 0's TX buffer size to 16kilobytes
parameter SET_SOCKET_0_TX_BFR_SZ = 32'b00000000_00011111_00001100_00010000;

parameter OPEN_SOCKET_0 = 32'b00000000_00000001_00001100_00000001;
parameter READ_SOCKET_0_STATE = 32'b00000000_00000011_00001000_00100010;


parameter SEND_PACKET_SOCKET_0 = 32'b00000000_00000001_00001100_00100000;
parameter READ_CHIP_VERSION       = 32'b00000000001110010000000000000000;